<?php

/**
 * uniBoard TASK: Dialy Cleaning
 *
 * Light and fast forum solution for web 2.0-like communities.
 *
 * @package		uniBoard
 * @author		Rafał Pitoń
 * @license		http://www.gnu.org/licenses/gpl-3.0.html
 * @since		Version 0.1
 * 
 * ------------------------------------------------------------------------
 * 
 * $Date: 2010-09-06 01:45:14 +0000 (Mon, 06 Sep 2010) $
 * $Revision: 59 $
 * $Author: rafio.xudb@gmail.com $
 */

// ------------------------------------------------------------------------

class task{
	
	// ------------------------------------------------------------------------

	/**
	 * Initialise Task
	 *
	 * @param object $appCore
	 */
	
	function __construct( $appCore){
		
		// Kill outdated Session keys?
		if ( $appCore -> conf['board_autolog_lenght'] > 0)
		{
			$appCore -> db -> delete( 'sessions_keys', 'key_last_use < \'' . ( $appCore -> time - (86400 * $appCore -> conf['board_autolog_lenght'])) . '\'');
		}
				
	}
	
}